<?php
header('content-type:text/html; charset=utf-8');
$id=$_REQUEST["id"];
echo $id;

$pdo=new PDO('mysql:dbname=mydb3;charset=utf8','root');
$star=$pdo->prepare('delete from user where id=:id');
if($star->execute(array('id'=>$id))){
	header('Refresh:2;url=/tongxunlu.php');
	die('<h3>删除成功</h3><a href=/tongxunlu.php>返回通讯录</a>');
}

/*
 * $lin=$star->fetchAll(PDO::FETCH_NAMED);
if($id=='1'){
	delete from user where id='1';
	header('Refresh:3;url=/tongxunlu.php');
	die('<h3>删除成功</h3><a href=/tongxunlu.php>返回通讯录</a>');
}else if($id=='2'){
	delete from user where id='2';
	header('Refresh:3;url=/tongxunlu.php');
	die('<h3>删除成功</h3><a href=/tongxunlu.php>返回通讯录</a>');
}else($id=='3'){
	delete from user where id='3';
	header('Refresh:3;url=/tongxunlu.php');
	die('<h3>删除成功</h3><a href=/tongxunlu.php>返回通讯录</a>');
}*/
